package cn.usian.service.impl;

import cn.usian.common.ResultEnum;
import cn.usian.feign.LesseeFeign;
import cn.usian.common.Results;
import cn.usian.pojo.Lessee;
import cn.usian.service.LandlorService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;

@Service
public class LandlorServiceImpl implements LandlorService {
    @Qualifier("cn.usian.feign.LesseeFeign")
    @Autowired
    private LesseeFeign lesseeFeign;
    @Override
    public Results findById(Long id) {
        Lessee lessee = lesseeFeign.findLessee(id);
        return Results.build(lessee,ResultEnum.SUCCESS);
    }


}